//package com.caojm.mptools.client.screen;
//
//import com.mojang.blaze3d.systems.RenderSystem;
//import net.minecraft.client.MinecraftClient;
//import net.minecraft.client.gui.screen.Screen;
//import net.minecraft.client.gui.DrawContext;
//import net.minecraft.text.Text;
//import net.minecraft.util.Identifier;
//
//public class QRCodeScreen extends Screen {
//
//    private static final Identifier WECHAT_QR_CODE_TEXTURE = new Identifier("mingpixeltools", "textures/gui/qrcodes/wechat_qr.jpg");
//    private static final Identifier ALIPAY_QR_CODE_TEXTURE = new Identifier("mingpixeltools", "textures/gui/qrcodes/alipay_qr.jpg");
//
//    private final String qrType;
//
//    public QRCodeScreen(Text title, String qrType) {
//        super(title);
//        this.qrType = qrType;  // 用于区分显示微信还是支付宝二维码
//    }
//
//    @Override
//    public void render(DrawContext context, int mouseX, int mouseY, float delta) {
//        super.render(context, mouseX, mouseY, delta);
//
//        MinecraftClient client = MinecraftClient.getInstance();
//
//        // 根据 qrType 选择微信或支付宝二维码
//        Identifier qrCodeTexture = qrType.equals("wechat") ? WECHAT_QR_CODE_TEXTURE : ALIPAY_QR_CODE_TEXTURE;
//
//        // 绑定纹理
//        RenderSystem.setShaderTexture(0, qrCodeTexture);
//
//        // 使用 DrawContext 渲染纹理
//        context.drawTexture(qrCodeTexture, 100, 100, 128, 128);  // 设定显示位置和大小
//    }
//}
